﻿@using WebVella.Erp.Web.Models;
@using Newtonsoft.Json;
@addTagHelper *, WebVella.Erp.Web
@{
	var theme = (Theme)ViewBag.Theme;
	var currentApp = (App)ViewBag.CurrentApp;
	var pageModel = (BaseErpPageModel)ViewBag.PageModel;
}
<!--c:Nav_Default-->
<div id="nav" class="pl-2 pr-2">
	<div class="menu-nav-wrapper home">
		<div class="menu-nav">
			<a href="/" class="pl-2 pr-2">
				<span class="fas fa-home icon"></span>
			</a>
		</div>
	</div>
	<vc:site-menu page-model="@pageModel"></vc:site-menu>
	<div id="brand-logo" class="pl-3 pr-3">
			@if (currentApp == null)
			{
				<a href="@ViewBag.AppDefaultLink">
					<img src="@ViewBag.BrandLogo" />
					<span class="app-label"  style="color:@ViewData["BodyBorderColor"]">@ViewBag.DefaultAppName</span>			
				</a>
			}
			else {
				<a href="@ViewBag.AppDefaultLink">
					<img src="@ViewBag.BrandLogo" />
					<span class="app-label" title="@currentApp.Label"  style="color:@ViewData["BodyBorderColor"]">@currentApp.Label</span>			
				</a>
			}
	</div>
	<vc:application-menu page-model="@pageModel"></vc:application-menu>

	<div id="nav-right">
		<vc:user-menu page-model="@pageModel"></vc:user-menu>
		<vc:search-nav></vc:search-nav>
		<vc:user-nav></vc:user-nav>
	</div>
</div>

@Html.Raw(ViewBag.EmbededJs)